<?php
namespace App\Services\Mobile;

use App\Services\Mobile\Auth\AuthLogic;

class Auth
{
    public function login($data)
    {
        ValidateAuth::checkValidate($data, ['userId']);
        return (new AuthLogic())->login($data);
    }

    public function register($data)
    {
        ValidateAuth::checkValidate($data, ['software_id', 'real_name', 'phone', 'stage_name', 'provice', 'major']);
        return (new AuthLogic())->register($data);
    }

    public function checkIdentity($data)
    {
        ValidateAuth::checkValidate($data, ['id', 'password']);
        return (new AuthLogic())->checkIdentity($data);
    }

    public function updateInfo($data)
    {
        ValidateAuth::checkValidate($data, ['id', 'password']);
        return (new AuthLogic())->updateInfo($data);
    }

    public function checkPhone($data)
    {
        ValidateAuth::checkValidate($data, ['phone']);
        return (new AuthLogic())->checkPhone($data);
    }
}